<?php
require_once('Smarty.class.php');
class View_Smarty extends Smarty
{
    public function __construct($params = array(), $config = array())
    {
        parent::__construct();
        if (empty($config)){
            $config = __get_config();
        }
        $this->template_dir      = SiteManageRootDir . DIRECTORY_SEPARATOR . $config['Smarty']['template_dir'];
        $this->compile_dir       = SiteManageRootDir . DIRECTORY_SEPARATOR . $config['Smarty']['compile_dir'];
        $this->plugins_dir       = array($this->plugins_dir[0], SiteManageRootDir . DIRECTORY_SEPARATOR . $config['Smarty']['plugins_dir']);
        $this->default_modifiers = array('escape');
        $this->assign('params', $params);
        //
        $this->assign('config', $config);
        $this->assign('plugin', __get_config('plugin.ini'));
        $this->assign('template_dir', $this->template_dir);
        //
        if (!empty($params['errors'])){
            $this->errors = $params['errors'];
        }
        if (!empty($params['messages'])){
            $this->messages = $params['messages'];
        }
		//$url_localhost =  "http://localhost/";
		//$url_localhost =  "http://210.143.102.113/";
		$this->assign('ec_manamer_url',"" );
		$this->assign('ec_shop_url',"../" );
    }
    public function display($template = null, $cache_id = null, $compile_id = null, $parent = null)
    {
        parent::display($template, $cache_id, $compile_id, $parent);
    }
}
?>
